package com.baylor.server.base.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="oauth_access_token")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class OauthAccessToken implements Serializable {

	private static final long serialVersionUID = 8585202128197453715L;
	
	private String tokenId;
	private String userName;
	private String refreshToken;
	
	@Column(name="user_name")
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
    @Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="token_id")
	public String getTokenId() {
		return tokenId;
	}
	public void setTokenId(String tokenId) {
		this.tokenId = tokenId;
	}
	@Column(name="refresh_token")
	public String getRefreshToken() {
		return refreshToken;
	}
	public void setRefreshToken(String refreshToken) {
		this.refreshToken = refreshToken;
	}
	
	
}
